package com.woniuxy.homepage.core.controller;


import com.woniuxy.common.CommonResult;
import com.woniuxy.homepage.core.model.CarGoodsStyle;
import com.woniuxy.homepage.core.service.CarGoodsStyleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gmx
 * @since 2021-07-13
 */
@RestController
@RequestMapping("/carGoodsStyle")
public class CarGoodsStyleController {

    @Resource
    private CarGoodsStyleService styleService;



    /**
     * Description : 查询商品类型  <br/>
     * ChangeLog : 1. 创建 (2021/7/13 12:03 [Hello Mr. Guo]);
     *
     * @return com.woniuxy.common.CommonResult
    */
    @GetMapping("selectGoodsStyle")
    public CommonResult selectGoodsStyle(){
        List<CarGoodsStyle> list = this.styleService.selectGoodsStyle();
        if (list == null){
            return CommonResult.fail("查询商品类型数据失败");
        }
        return CommonResult.success(list);
    }

}

